<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=3,minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <title>GO机网</title>
    <link href="../css/reset-html5.css" rel="stylesheet">
    <link href="../css/mui.min.css" rel="stylesheet">
    <link href="../css/mui.picker.min.css" rel="stylesheet">
    <link href="../css/wx-main.css?20161028_1" rel="stylesheet">
    <script src="../js/jquery-2.2.1.min.js"></script>
    <script src="../plugins/vue/vue.min.js"></script>
    <style>
        body{
            font-size: 14px;
        }
    </style>
</head>
<body id="main">
<header class="text-color1">
        <span class="left-btn text-color2" onclick="location.href='my_ji_you.html'">
           返回
        </span>
        绑定我的机友账号
</header>

<img src="../images/logo.png" style="width: 100%">
<!--<h3 class="mui-text-center" style="margin: 50px 0">管理后台登录验证</h3>-->
<form class="mui-input-group mar-top" onsubmit="return false">
    <div class="mui-input-row">
        <label>手机号</label>
        <input type="tel" placeholder="请输入您的手机号码" id="phone">
    </div>
    <div class="mui-input-row">
        <label>密码</label>
        <input type="password" placeholder="请输入密码" id="password">
    </div>

    <div class="mui-button-row">
        <button class="mui-btn mui-btn-primary btn-lg" id="bandWeixin" onclick="register()">注册</button>
    </div>
</form>
</body>
<script src="../js/mui.min.js"></script>
<script src="../js/phone.js"></script>
<script>


    function getQueryString(name) {
        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
        var r = window.location.search.substr(1).match(reg);
        if (r != null) return unescape(r[2]); return '';
    }

    function register(){
        var data = {};
        data.phone = $('#phone').val();
        data.password = $('#password').val();
        $.post('../index/index.php?m=Home&c=Index&a=userWeixinBoundPhone',data,function(res){
            if(res.code==200){
                mui.alert('注册关联成功,可以在pc后台登录查看你的机友信息', 'GO机网', function() {
                    location.href = 'my_ji_you.html';
                });

            }else{
                alert(res.message);
            }
        },'json');
    }
</script>
</html>